<template>
    <div>
        测试
        <p>数字：{{ num }}</p>
        <el-button @click="toDetail">测试详情</el-button>
        <el-button @click="detail">测试1详情</el-button>
        <br />
        
        <VoVideoPlayer :options="options"></VoVideoPlayer>

        <br />
        <router-view></router-view>
    </div>
</template>

<script>
import VoVideoPlayer from '@/components/videoPlayer'
let flag = 1;

export default {
    components: {
        VoVideoPlayer
    },
    data() {
        return {
            num: 1,
            options: {
                url: 'https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4',
                // videoInit: true,//首帧封面
                poster: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fup.enterdesk.com%2Fedpic%2F07%2F64%2Fed%2F0764ed3ee0771991c6d6160ced43d5b9.jpg&refer=http%3A%2F%2Fup.enterdesk.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1629533240&t=83621ac38991720c68e3d3ed47a96f8a',
            }
        };
    },
    created() {
        this.$bus.on("num-change", this.numChange);
    },
    beforeDestroy() {
        this.$bus.off("num-change", this.numChange);
    },
    methods: {
        numChange(data) {
            this.num = data;
        },
        toDetail() {
            this.$router.push("/test/detail");
        },
        detail() {
            this.$router.push("/test1/detail");
        },
    },
};
</script>

<style lang="scss" scoped>
</style>